#include <iostream>
#include <string>
#include <fstream>

using namespace std;

int main()
{
    ofstream out("./log.txt", ios::out | ios::binary);
    if (!(out.is_open()))
    {
        cerr << "open error" << endl;
        return 1;
    }

    int count = 5;
    while(count--)
    {
        string message = "hello qingdiaoshen\n";
        out.write(message.c_str(), message.size());
    }

    out.close();

    return 0;
}
